package com.googlecode.gwtbb.server.dao.user;

import com.googlecode.gwtbb.client.shared.entity.user.User;
import com.googlecode.gwtbb.server.dao.DaoIbatis;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Abraham Grief
 * @version $Id$
 * @since Jun 25, 2008
 */
@Transactional
public class UserDaoIbatis extends DaoIbatis<User> implements UserDao {
	public String getSqlNamespace() {
		return "gwtbb.user";
	}

	public User selectByUsername(String username) {
		return (User)getSqlMapClientTemplate().queryForObject("gwtbb.user.selectByUsername", username);
	}

	public User selectSansPassword(Long id) {
		return (User)getSqlMapClientTemplate().queryForObject("gwtbb.user.selectSansPassword", id);
	}
}
